﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Xml.Serialization;

namespace PS.Practices.Provisioner.Sandbox.Test.Core
{
    public class DeSerializer
    {
        public static T Parse<T>(string xml)
        {
            var xmlSerializer = new XmlSerializer(typeof(T));
            using (var stringReader = new StringReader(xml))
            {
                var o = (T)xmlSerializer.Deserialize(stringReader);
                return o;
            }
        }
    }
}
